Class Characteristic<T>
Represents a Bluetooth characteristic with a generic value of type <code class="typeparamref">T</code>.
Assembly: Meadow.dll
View Source
Declaration
public abstract class Characteristic<T> : Characteristic, ICharacteristic, IAttribute, IJsonSerializable
Inheritance: System.Object
-> Meadow.Gateways.Bluetooth.Characteristic
Derived:
Meadow.Gateways.Bluetooth.CharacteristicBool
Implements:
Meadow.Gateways.Bluetooth.ICharacteristic
Methods
SerializeValue(T)
Serializes the value of type <code class="typeparamref">T</code> to a byte array.
View Source
Declaration
protected abstract byte[] SerializeValue(T value)
Returns
System.Byte[]
: The byte array representing the serialized value.
Parameters
Type | Name | Description |
---|---|---|
<T> | value | The value to be serialized. |
SetValue(T)
Sets the value of the characteristic.
View Source
Declaration
public void SetValue(T value)
Parameters
Type | Name | Description |
---|---|---|
<T> | value | The value to be set. |
SetValue(object)
Sets the value of the characteristic.
View Source
Declaration
public override void SetValue(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to be set. |